// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

//引入less
import less from 'less'

// 引入element-ui
import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import './assets/css/element/index.css'

// 引入VueSlider
import VueSlider from 'vue-slider-component'
import './assets/css/default.css'
// import 'vue-slider-component/theme/default.css'

//引入toast
import Toast from './components/toast/Toast'

//引入lib-flexible屏幕适配
// import 'lib-flexible/flexible'//使用node_modules库
import './assets/js/flexible'

//引入国际化
import i18n from "./i18n"

//在手机端输出日志（绿色按钮），测试用，发布时必须关闭
// import Vconsole from 'vconsole';
// let vConsole = new Vconsole();
// export default Vconsole

Vue.config.productionTip = false

// 引入less
Vue.use(less)

// 引入element-ui
Vue.use(ElementUI)

// 引入VueSlider
Vue.component('VueSlider', VueSlider)

//弹出说明控件
import Tip from './components/custom/Tip.vue'
const components = {
  Tip
}
Object.keys(components).forEach(key => {
  Vue.component(key, components[key])
})

// 用全局变量来引用toast
Vue.prototype.$toast = Toast

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  i18n, //挂载国际化
  components: {
    App
  },
  template: '<App/>',
  data: function () {
    return {
      lastTime: 0,
    }
  },
})
